package com.carsite.model;

import java.io.Serializable;
/**
 *  明细表
 * @struts.form include-all="false" extends="BaseForm"
 * @hibernate.class table="WT_item"
 */
public class Item extends BaseObject implements Serializable {
	
	private Long itemId;

	private String sn;// 货号
	
	private String title; //货名称

	private String type;// 种类 meterial or product

	private Integer num;// 数量
	
	private Order order;//所属单据

	
	  /**
     * @struts.form-field form-name="ItemForm"
     * @hibernate.id column="itemId" generator-class="increment" unsaved-value="null"
     */
	
	public Long getItemId() {
		return itemId;
	}
	/**
	 * @struts.form-field form-name="ItemForm" 
	 * @hibernate.property  
	 */
	public Integer getNum() {
		return num;
	}
	/**
     * @hibernate.many-to-one  cascade="none"
     * column="order_Id" 
     * inverse="false"
     * lazy="false"
     * not-null="true"
     */
	public Order getOrder() {
		return order;
	}
	/**
	 * @struts.form-field form-name="ItemForm" 
	 * @hibernate.property  
	 */
	public String getSn() {
		return sn;
	}
	/**
	 * @struts.form-field form-name="ItemForm" 
	 * @hibernate.property  
	 */
	public String getType() {
		return type;
	} 
	
	/**
	 * @struts.form-field form-name="ItemForm" 
	 * @hibernate.property  
	 */
	
	public String getTitle() {
		return title;
	}
	
	
	
	
	 

	public void setItemId(Long itemId) {
		this.itemId = itemId;
	}
	public void setSn(String sn) {
		this.sn = sn;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public void setType(String type) {
		this.type = type;
	}
	public void setNum(Integer num) {
		this.num = num;
	}
	public void setOrder(Order order) {
		this.order = order;
	}
	@Override
	public boolean equals(Object o) {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public int hashCode() {
		// TODO Auto-generated method stub
		return (this.itemId+this.sn).hashCode();
	}

	@Override
	public String toString() {
		// TODO Auto-generated method stub
		return null;
	}

}
